const state = {
  WordColor: 'rgba(53, 64, 64, 1)',
  checkColor: 'rgba(250, 212, 0, 1)',
  barColor: '',
  navstyle: '',
  radio: '3',
  idx: '',
  tarbar: [
    {
      selected: true,
      navigation: "首页",
      link: "",
      defultIcon: "https://zltc-1255680458.cos.ap-beijing.myqcloud.com/1573108385.png",
      select: "https://zltc-1255680458.cos.ap-beijing.myqcloud.com/1573111913.png",
      sort: "我是导航",
      operation: "我是导航"
    },
    {
      selected: false,
      navigation: "生活",
      link: "",
      defultIcon: "https://zltc-1255680458.cos.ap-beijing.myqcloud.com/1573108385.png",
      select: "https://zltc-1255680458.cos.ap-beijing.myqcloud.com/1573111913.png",
      sort: "我是导航",
      operation: "我是导航"
    },
    {
      selected: false,
      navigation: "房产",
      link: "",
      defultIcon: "https://zltc-1255680458.cos.ap-beijing.myqcloud.com/1573108385.png",
      select: "https://zltc-1255680458.cos.ap-beijing.myqcloud.com/1573111913.png",
      sort: "我是导航",
      operation: "我是导航"
    }
  ]
}

const mutations = {
  SET_WORDCOLOR: (state, WordColor) => {
    state.WordColor = WordColor
  },
  SET_CHECKC0LOR: (state, checkColor) => {
    state.checkColor = checkColor
  },
  SET_BARCOLOR: (state, barColor) => {
    state.barColor = barColor
  },
  SET_STYLE: (state, navstyle) => {
    state.navstyle = navstyle
  },
  SET_RADIO: (state, radio) => {
    state.radio = radio
  },
  SET_TABAR: (state, tarbar) => {
    state.tarbar = tarbar
  },
  SET_IDX: (state, idx) => {
    state.idx = idx
  }
}

const actions = {
  set_state({ commit }, editState) {
    commit("SET_WORDCOLOR", editState.WordColor);
    commit("SET_CHECKC0LOR", editState.checkColor);
    commit("SET_BARCOLOR", editState.barColor);
    commit("SET_STYLE", editState.navstyle);
    commit("SET_RADIO", editState.radio);
    commit("SET_TABAR", editState.tarbar);
    commit("SET_IDX", editState.idx);
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
